<html>
<title> iPad Sound Test - Auto Play </title>
<script src="/jquery/jquery-1.7.2.js"></script>
<style>
#button:hover {
	background-color: red;
}
</style>

<script src="sound.js"></script>
<script type="text/javascript">

$(document).ready(function () {
//	setupSFX();
});
$(document).ready(function () {
//	document.body.appendChild(document.createTextNode("a"));
});
$(document).ready(function () {
//	document.body.appendChild(document.createTextNode("b"));
});

var soundMap = {"beep": "sfx/sound6.mp3"};

$(document).ready(function() {
	$("#play").click(function() { soundPlay(soundMap["beep"]); });
	$("#playc").click(function() { cloneSound("sound6"); });
	$(".player").click(function() { soundPlay($(this).text()) });
});

/**
 * Returns a random number between min and max
 */
function getRandomArbitary (min, max) {
	return Math.random() * (max - min) + min;
}
/**
 * Returns a random integer between min and max
 * Using Math.round() will give you a non-uniform distribution!
 */
function getRandomInt (min, max) {
	return Math.floor(Math.random() * (max - min + 1)) + min;
}

</script>
</head>
<body>
<audio src="sfx/sound6.mp3" id="sound6" preload></audio>

<div>Test</div>
<button class="sfx">Play A</button>
<button id="play">Play B</button>
<button id="playc">Play C</button>

<button class="player">sfx/sound2.mp3</button>
<button class="player">sfx/sound3.mp3</button>
<button class="player">sfx/sound4.mp3</button>
<button class="player">sfx/sound5.mp3</button>
<button class="player">sfx/sound6.mp3</button>
</body>
</html>
